/**
 * 报价 api 封装
 */
import {getRequest, postRequest, request} from '/@/lib/axios';

export const inventoryApi = {

    /**
     * 分页查询
     */
    queryPage: (param) => {
        return postRequest('/machine/queryPage', param);
    },
    /**
     * 增加
     */
    add: (param) => {
        return postRequest('/machine/add', param);
    },

    /**
     * 修改
     */
    update: (param) => {
        return postRequest('/machine/update', param);
    },

    /**
     * 删除
     */
    delete: (id) => {
        return getRequest(`/machine/delete/${id}`);
    },

    /**
     * 取消第三方渠道占用 ids
     */
    cancelOccupancyChannel: (ids) => {
        return postRequest(`/machine/cancelThirdPartyOccupancy?ids=${ids}`);
    },
    /**
     * 取消第三方渠道占用 ids
     */
    occupancyChannel: (ids) => {
        return postRequest(`/machine/thirdPartyOccupancy?ids=${ids}`);
    },
    /**
     * 修改库位 ids
     */
    changeStorageRack: (ids,param) => {
        return postRequest(`/machine/uppStorage?ids=${ids}`,param);
    },

    /**
     * 获取设备信息
     */
    getDeviceInfo: (id) => {
        return getRequest(`/machine/detail/${id}`);
    },


};
